package com.eps.Test;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * User: Red_Code
 * Date: 12-10-27
 * Time: 上午12:27
 */
public class IndexControl extends AbstractController  {
    private String info;

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        request.setCharacterEncoding("UTF8");
        response.setCharacterEncoding("UTF8");

        String sinfo=request.getParameter("info");
        request.setAttribute("info",sinfo);
        return new ModelAndView("index");
    }
}
